package com.atguigu.gulimall.product;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.session.data.redis.config.annotation.web.http.EnableRedisHttpSession;

/**
 *
 *
 *
 * spring整合springCache简化缓存开发
 *      1）引入依赖
 *         spring-boot-starter-cache 、spring-boot-starter-data-redis
 *      2)写配置
 *         redisCacheConfiguration会导入 RedisCacheConfiguration;
 *         配置使用redis作为缓存
 *      3）测试使用缓存
 *         @Cacheable  保存
 *         @CacheEvict  删除
 *         @CachePut    不影响方法的执行更新缓存
 *         @Caching      组合以上多个操作
 *         @CacheConfig     在类级别共享缓存的相同配置
 *
 */
@EnableRedisHttpSession
@EnableFeignClients(basePackages = "com.atguigu.gulimall.product.feign")
@MapperScan("com.atguigu.gulimall.product.dao")
@SpringBootApplication
@EnableDiscoveryClient
public class GulimallProductApplication {

    public static void main(String[] args) {
        SpringApplication.run(GulimallProductApplication.class, args);
    }

}
